<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class OrderRemark extends BaseModel
{
    use HasFactory;
    protected $table = 'order_remark';
    // 允许批量操作的字段
    protected $fillable = ['order_id',
        'type',
        'order_id',
        'mujia',
        'mianliao',
        'teshu',
        'zuoweishu',
        'haimian',
        'chuangdianhoudu',
        'chuangxianggaodu',
        'pinpai',
        'created_at',
        'updated_at'];

    public function scopeSearch($query,$params)
    {
        if(!empty($params['order_id'])){
            $query->where('order_id',$params['order_id']);
        }
        return $query;
    }
}
